package com.luban.hs.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

import java.util.UUID;

/**
 * @Author: hs
 * @Description:
 * @Date: Create in 20:19 2019/2/25
 */
@Component
public class OfferDaoImpl implements OfferDao {

    @Autowired
    JdbcTemplate jdbcTemplate;

    /**
     * 插入
     */
    @Override
    public void insertOffer() {
        String sql = "INSERT INTO tbl_user(username,age) VALUES(?,?)";
        String username = UUID.randomUUID().toString().substring(0, 5);
        jdbcTemplate.update(sql, username,19);
    }
}
